﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="../../lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        
    </style>
    <script src="../../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../../lib/ligerUI/js/core/base.js" type="text/javascript"></script>
    <script src="../../lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
    <script src="../../lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
    <script src="../../lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
    <script src="../../lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
    <script src="../grid/CustomersData.js" type="text/javascript"></script>
    <script type="text/javascript">
        function getGridOptions(checkbox)
        {
            var options = {
                columns: [
                { display: '顾客', name: 'CustomerID', align: 'left', width: 100, minWidth: 60 },
                { display: '公司名', name: 'CompanyName', minWidth: 120, width: 100 },
                { display: '联系名', name: 'ContactName', minWidth: 140, width: 100 },
                { display: '电话', name: 'Phone', width: 100 },
                { display: '城市', name: 'City', width: 100 },
                { display: '国家', name: 'Country', width: 100 }
                ], switchPageSizeApplyComboBox: false,
                data: $.extend({}, CustomersData),
                pageSize: 30, 
                checkbox: checkbox
            };
            return options;
        }

        $(function ()
        {

            $("#txt1").ligerComboBox({
                width: 250,
                slide: false,
                selectBoxWidth: 500,
                selectBoxHeight: 240, valueField: 'CustomerID', textField: 'CustomerID'
                , grid: getGridOptions(true)
            });

            $("#txt2").ligerComboBox({
                width: 250,
                slide: false,
                selectBoxWidth: 500,
                selectBoxHeight: 240, valueField: 'CustomerID', textField: 'CustomerID'
                , grid: getGridOptions(false)
            });


        }); 
    </script>
</head>
<body style="padding: 10px">
    带复选框：
    <br />
    <input type="text" id="txt1" />
    <br />
    不带复选框：
    <br />
    <input type="text" id="txt2" />
    <br />
    <div style="display: none;">
    </div>
</body>
</html>
